package org.intellij.plugins.junit4;

import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;

/**
 * Facade for com.intellij.openapi.ui.Messages, simplifying the api a bit.
 *
 * @author Justin Tomich
 */
public class Dialog
{
    private static final String WARNING = "Warning";
    private static final String ERROR = "Error";


    public static void warn(Project p, String msg)
    {
        Messages.showErrorDialog(p, msg, WARNING);
    }


    public static void warn(Module m, String msg)
    {
        Messages.showErrorDialog(m.getProject(), msg, WARNING);
    }


    public static void error(Project p, String msg)
    {
        Messages.showErrorDialog(p, msg, ERROR);
    }


    public static void error(Module m, String msg)
    {
        Messages.showErrorDialog(m.getProject(), msg, ERROR);
    }

}
